﻿using SIG.Resources.Admin;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace SIG.InputModel.Admin.Pages
{
    public class PageIM
    {
      
        public int Id { get; set; }
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        [Display(ResourceType = typeof(Labels), Name = "Title")]
        public string Title { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "Content")]     
        public string Body { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "SeoName")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        [RegularExpression(@"^[a-zA-Z]+$", ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "InvalidFormatOnlyEnglish")]
        [Remote("IsSeoNameUnique", "Page", AdditionalFields = "Id", ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "IsExist")]
        public string SeoName { get; set; }


        
        [Display(ResourceType = typeof(Labels), Name = "Active")]
        public bool Active { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "KeyWords")]
        public string Keywords { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "Description")]
        public string SEODescription { get; set; }

    }
}
